﻿<div class="dialog-container mdl-shadow--8dp mdl-layout--fixed-header SMES-dialog B0250-dialog" ng-init="dialog.init();"  style="background-color: #fafafa;">
    <div class="kmi-header-row">
        <div class="header-title" ng-show= "dialog.mode_type == 'U'" ng-bind="'B0250.title1' | translate"></div>
        <div class="header-title" ng-show= "dialog.mode_type == 'D'" ng-bind="'B0250.title2' | translate"></div>
        <div class="kmi-side-btn right" ng-click="dialog.back();">
            <img src="image/icons/clear.png"></img>
            <div class="kmi-can-click"></div>
        </div>
    </div>
    <div class="kmi-layout-main-content">
        <div class="kmi-text-fields" ng-show="dialog.parent != 'B0214'">
            <label class="label" ng-bind="'B0250.ICCard' | translate"></label>
            <input class="value" id="ic_card" ng-model="dialog.ic_card" ng-keypress="dialog.searchICCard($event);"></input>
            <div class="tip qrcode" ng-click="dialog.ICCardScanner();">
                <img src="image/icons/QRCode.png">
            </div>
        </div>
        <div class="kmi-text-fields">
            <label class="label" ng-bind="'B0250.empNo' | translate"></label>
            <input class="value" id="tmpEmp_no" ng-model="dialog.tmpEmp_no" ng-keypress="dialog.searchEmp($event);" ng-disabled="dialog.parent == 'B0214'"></input>
            <div class="tip search" ng-click="dialog.searchEmp();"><img src="image/icons/search.png"></img> </div>
        </div>
        <div class="kmi-text-fields" ng-if="dialog.need_work_reason">
            <label class="label" ng-show="dialog.mode_type == 'U'" ng-bind="'B0250.reason1' | translate"></label>
            <label class="label" ng-show="dialog.mode_type == 'D'" ng-bind="'B0250.reason2' | translate"></label>
            <input class="value" ng-value="dialog.resason_name" readonly="readonly"
                   ng-disabled="!dialog.tmpOnWorkInfo.employee_work_detail || dialog.user_list.length <= 0" ng-click="dialog.loadEmpWorkReason();"></input>
            <div class="tip"><i class="material-icons">&#xE5CF;</i></div>
            <label class="label"></label>
            <div style="flex: 1"></div>
        </div>
        <!-- 20210311 Modify by德義家興for #0088189: [標準][生產任務中心][DEV]人員上、下工綁定生產批功能優化 -->
        <div class="btn-panel" style="display:flex;flex-direction:row;">
            <div class="kmi-text-fields">
                <label ng-if="dialog.parent != 'B0201'" class="label" ng-bind="('common.queryList.machine_c' | translate) + '：'"></label>
                <label ng-if="dialog.parent == 'B0201'" class="label" ng-bind="('common.queryList.area_c' | translate) + '：'"></label>
                <label class="label" ng-bind="dialog.machine_no"></label>
            </div>
            <div style="flex: 1;display: flex;flex-direction: row;justify-content: flex-end;">
                <div class="kmi-button" ng-click="dialog.openDialogUserBindInfo();" style="width:100px">
                    <label ng-bind="'B0250.btn5' | translate"></label>
                    <div class="kmi-can-click"></div>
                </div>
                <div class="kmi-button" ng-click="dialog.openDialogLotBindInfo();" style="width:100px">
                    <label ng-bind="'B0250.btn6' | translate"></label>
                    <div class="kmi-can-click"></div>
                </div>
            </div>
        </div>
        <div class="kmi-layout-page" style="padding: 10px;justify-content: flex-start;flex-direction: row;">
            <div class="kmi-list column-selector" style="margin:5px;" kmi-scrollbar="500px" column-selector-id="user_info_list">
                <div class="kmi-list__header">
                    <!-- 20230313 modify by Alan for M#129881: -->
                    <div class="kmi-list__column width-fixed" style="flex:0 0 40px;">
                        <button class="mdl-button mdl-js-button mdl-button--icon" ng-click="dialog.userItemSelectAll();" ng-disabled="outsourceInfo.outsourcing_info_detail.length==0">
                            <img ng-show="!dialog.user_select_all" src="image/icons/check0.png"></img>
                            <img ng-show="dialog.user_select_all" src="image/icons/check1.png"></img>
                        </button>
                    </div>
                    <div class="kmi-list__column head-controls require" style="flex:1;">
                        <div class="filter" ng-show="dialog.user_filterSH.user_no">
                            <input ng-model="dialog.user_filter.user_no">
                            <i class="material-icons clear" style="position: absolute;top: 2px;right: 4px;"
                               ng-click="dialog.user_filterSH.user_no = false;dialog.user_filter.user_no = '';">clear</i>
                        </div>
                        <div class="order" ng-hide="dialog.user_filterSH.user_no">
                            <i class="material-icons search" style="z-index:1;" ng-click="dialog.user_filterSH.user_no = true">search</i>
                            <label ng-bind="'B0250.empNo1' | translate"></label>
                        </div>
                    </div>
                    <div class="kmi-list__column head-controls require" style="flex:1;">
                        <div class="filter" ng-show="dialog.user_filterSH.user_name">
                            <input ng-model="dialog.user_filter.user_name">
                            <i class="material-icons clear" style="position: absolute;top: 2px;right: 4px;"
                               ng-click="dialog.user_filterSH.user_name = false;dialog.user_filter.user_name = '';">clear</i>
                        </div>
                        <div class="order" ng-hide="dialog.user_filterSH.user_name">
                            <i class="material-icons search" style="z-index:1;" ng-click="dialog.user_filterSH.user_name = true">search</i>
                            <label ng-bind="'B0250.employee_name' | translate"></label>
                        </div>
                    </div>
                    <div class="kmi-list__column head-controls require" style="flex:1;" ng-bind="'B0250.state_type' | translate"></div>
                </div>
                <div class="kmi-list__row-content" style="min-height:250px;">
                    <div class="kmi-list__row" ng-repeat="item in dialog.user_list | filter:dialog.user_filter">
                        <div class="kmi-list__column" style="flex:0 0 40px;z-index:1;">
                            <!-- <i ng-show="item.mark" class="material-icons icon-green" >brightness_1</i> -->
                            <button class="mdl-button mdl-js-button mdl-button--icon" ng-click="dialog.userItemClick(item)">
                                <img ng-show="!item.mark" src="image/icons/check0.png"></img>
                                <img ng-show="item.mark" src="image/icons/check1.png"></img>
                            </button>
                        </div>
                        <div class="kmi-list__column column-border" style="flex:1;" ng-bind="item.user_no"></div>
                        <div class="kmi-list__column column-border" style="flex:1;" ng-bind="item.user_name"></div>
                        <div class="kmi-list__column column-border" style="flex:1;" ng-bind="dialog.getState(item)"></div>
                        <!-- <div class="kmi-can-click" ng-click="openToolBar(item, $event);"></div> -->
                    </div>
                </div>
            </div>
            <div class="kmi-list column-selector" style="margin:5px;" kmi-scrollbar="500px" column-selector-id="lot_info_list">
                <div class="kmi-list__header">
                    <div class="kmi-list__column width-fixed" style="flex:0 0 40px;">
                        <button class="mdl-button mdl-js-button mdl-button--icon" ng-click="dialog.lotItemSelectAll();" ng-disabled="outsourceInfo.outsourcing_info_detail.length==0">
                            <img ng-show="!dialog.lot_select_all" src="image/icons/check0.png"></img>
                            <img ng-show="dialog.lot_select_all" src="image/icons/check1.png"></img>
                        </button>
                    </div>

                    <div class="kmi-list__column head-controls require" style="flex:1;">
                        <div class="filter" ng-show="dialog.lot_filterSH.plot_no">
                            <input ng-model="dialog.lot_filter.plot_no">
                            <i class="material-icons clear" style="position: absolute;top: 2px;right: 4px;"
                               ng-click="dialog.lot_filterSH.plot_no = false;dialog.lot_filter.plot_no = '';">clear</i>
                        </div>
                        <div class="order" ng-hide="dialog.lot_filterSH.plot_no">
                            <i class="material-icons search" style="z-index:1;" ng-click="dialog.lot_filterSH.plot_no = true">search</i>
                            <label ng-bind="'B0250.plot_no' | translate"></label>
                        </div>
                    </div>
                    <div class="kmi-list__column head-controls require" style="flex:1;">
                        <div class="filter" ng-show="dialog.lot_filterSH.op_no">
                            <input ng-model="dialog.lot_filter.op_no">
                            <i class="material-icons clear" style="position: absolute;top: 2px;right: 4px;"
                               ng-click="dialog.lot_filterSH.op_no = false;dialog.lot_filter.op_no = '';">clear</i>
                        </div>
                        <div class="order" ng-hide="dialog.lot_filterSH.op_no">
                            <i class="material-icons search" style="z-index:1;" ng-click="dialog.lot_filterSH.op_no = true">search</i>
                            <label ng-bind="'B0250.op_no' | translate"></label>
                        </div>
                    </div>

                </div>
                <div class="kmi-list__row-content" style="min-height:250px;">
                    <div class="kmi-list__row" ng-repeat="item in dialog.lotInfoList | filter:dialog.lot_filter">
                        <div class="kmi-list__column" style="flex:0 0 40px;z-index:1;">
                            <button class="mdl-button mdl-js-button mdl-button--icon" ng-click="dialog.lotItemClick(item)">
                                <img ng-show="!item.mark" src="image/icons/check0.png"></img>
                                <img ng-show="item.mark" src="image/icons/check1.png"></img>
                            </button>
                        </div>
                        <div class="kmi-list__column column-border" style="flex:1;" ng-bind="item.plot_no"></div>
                        <div class="kmi-list__column column-input" style="flex:1;" ng-bind="item.op_no"></div>
                        <!-- <div class="kmi-can-click" ng-click="openToolBar(item, $event);"></div> -->
                    </div>
                </div>
            </div>
        </div>
        <div class="search-tool" ng-show="dialog.mode_type == 'U'">
            <div class="kmi-button kmi-button-confrim" ng-click="dialog.work_up_and_lot_bind_confirm()" style="width:100px">
                <label ng-bind="'B0250.btn1' | translate"></label>
                <div class="kmi-can-click"></div>
            </div>
        </div>
        <div class="search-tool" ng-show="dialog.mode_type == 'D'">
            <div class="kmi-button kmi-button-confrim" ng-click="dialog.work_down_confirm()" style="width:100px">
                <label ng-bind="'B0250.btn2' | translate"></label>
                <div class="kmi-can-click"></div>
            </div>
            <div class="kmi-button kmi-button-confrim" ng-click="dialog.lot_release_confirm()" style="width:100px">
                <label ng-bind="'B0250.btn3' | translate"></label>
                <div class="kmi-can-click"></div>
            </div>
            <div class="kmi-button kmi-button-confrim" ng-click="dialog.work_down_and_lot_release_confirm()" style="width:120px">
                <label ng-bind="'B0250.btn4' | translate"></label>
                <div class="kmi-can-click"></div>
            </div>
        </div>
    </div>
    </div>
</div>
